﻿#region itdc

/************************************************************************
*Copyright(C) 2015 by qsgy
 *All rights reserved. 
 *FileName:     $safeitemname$
 *Author:       oyh
 *Version:      
 *UnityVersion：
 *Date:   $time$      
 *Description:    
 *History: 
************************************************************************/
#endregion
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Limit : MonoBehaviour {
    public Rod limiter;
    public Rod vic;
    private void Update()
    {
        if (limiter.tagert.y<0.42f)
        {
            if (vic.tagert.z > 5.3f)
            {
                vic.tagert.z = 5.3f;
                Application.ExternalCall("ExceptionOP", vic.name ,"z","max");

            }
            if (vic.tagert.z < 4.92f)
            {
                vic.tagert.z = 4.92f;
                Application.ExternalCall("ExceptionOP", vic.name, "z" ,"min");

            }
        }
    }

}
